home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Pentominoes 1.4.1 / source / Pentominoes ƒ / Pent code / pent help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  7.9 KB  |  231 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        pent help.c
  4.  
  5. Purpose:    This module handles the help windows.
  6.  
  7.  
  8. Pentominoes - a 2-D geometry board game
  9. Copyright (C) 1993 Mark Pilgrim
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program in a file named "GNU General Public License".
  23. If not, write to the Free Software Foundation, 675 Mass Ave,
  24. Cambridge, MA 02139, USA.
  25.  
  26. \**********************************************************************/
  27.  
  28. #include "pent help.h"
  29.  
  30. void DrawHelp(int whichHelp)
  31. {
  32.     GrafPtr        curPort;
  33.     
  34.     GetPort(&curPort);
  35.     EraseRect(&(curPort->portRect));
  36.  
  37.     MoveTo(10,15);
  38.     TextFont(3);
  39.     TextSize(9);
  40.     switch (whichHelp)
  41.     {
  42.         case 0:
  43.             DrawHelpPlay();
  44.             break;
  45.         case 1:
  46.             DrawHelpCopyright();
  47.             break;
  48.         case 2:
  49.             DrawHelpContact();
  50.             break;
  51.         case 3:
  52.             DrawHelpMath();
  53.             break;
  54.         case 4:
  55.             DrawHelpFAQ();
  56.             break;
  57.     }
  58. }
  59.  
  60. void DrawHelpPlay(void)
  61. {
  62.     DrawString("\pPentominoes is a game with a deceptively simple objective: fit");
  63.     MoveTo(10,27);
  64.     DrawString("\ptwelve different pieces on a game board with no spaces left");
  65.     MoveTo(10,39);
  66.     DrawString("\pover.  (The one exception to this rule is the 8 x 8 board minus");
  67.     MoveTo(10,51);
  68.     DrawString("\pany 4, where you may leave blank any four squares you wish.)");
  69.     MoveTo(10,63);
  70.     DrawString("\pPieces may be rotated and/or flipped when they are put on the");
  71.     MoveTo(10,75);
  72.     DrawString("\pboard, but they may not overlap each other.");
  73.     MoveTo(10,99);
  74.     DrawString("\pTo place a piece, highlight the squares on the board where the");
  75.     MoveTo(10,111);
  76.     DrawString("\ppiece should go, then either click on the picture of that piece,");
  77.     MoveTo(10,123);
  78.     DrawString("\ppress <RETURN>, press <ENTER>, or choose “Place Piece”");
  79.     MoveTo(10,135);
  80.     DrawString("\pfrom the “Fluff” menu.  You may use each piece only once.");
  81.     MoveTo(10,159);
  82.     DrawString("\pTo remove the pieces in the reverse order in which you placed");
  83.     MoveTo(10,171);
  84.     DrawString("\pthem, use “Undo”.  To remove a specific piece on the board,");
  85.     MoveTo(10,183);
  86.     DrawString("\pdouble-click on the piece on the board, or click on the piece");
  87.     MoveTo(10,195);
  88.     DrawString("\ponce and choose “Remove Piece” from the “Fluff” menu.");
  89. }
  90.  
  91. void DrawHelpCopyright(void)
  92. {
  93.     DrawString("\pPentominoes is copyright ©1993 Mark Pilgrim.  This");
  94.     MoveTo(10,27);
  95.     DrawString("\pprogram is free; you can redistribute it and/or modify it");
  96.     MoveTo(10,39);
  97.     DrawString("\punder the terms of the GNU General Public License as published");
  98.     MoveTo(10,51);
  99.     DrawString("\pby the Free Software Foundation; either version 2 of the");
  100.     MoveTo(10,63);
  101.     DrawString("\pLicense, or (at your option) any later version.");
  102.     MoveTo(10,87);
  103.     DrawString("\pPentominoes is distributed in the hope that it will be useful,");
  104.     MoveTo(10,99);
  105.     DrawString("\pbut WITHOUT ANY WARRANTY; without even the implied");
  106.     MoveTo(10,111);
  107.     DrawString("\pwarranty of MERCHANTABILITY or FITNESS FOR A");
  108.     MoveTo(10,123);
  109.     DrawString("\pPARTICULAR PURPOSE.  See the GNU General Public License");
  110.     MoveTo(10,135);
  111.     DrawString("\pfor more details.");
  112.     MoveTo(10,159);
  113.     DrawString("\pYou should have received a copy of the GNU General Public");
  114.     MoveTo(10,171);
  115.     DrawString("\pLicense along with this program; if not, write to the Free");
  116.     MoveTo(10,183);
  117.     DrawString("\pSoftware Foundation, Inc., 675 Mass Ave, Cambridge, MA,");
  118.     MoveTo(10,195);
  119.     DrawString("\p02139, USA.");
  120. }
  121.  
  122. void DrawHelpContact(void)
  123. {
  124.     DrawString("\pAll Macintosh users should feel free to contact me for any of");
  125.     MoveTo(10,27);
  126.     DrawString("\pthe following reasons: reporting bugs or suggestions about");
  127.     MoveTo(10,39);
  128.     DrawString("\pPentominoes or any other program I’ve written; discussing the");
  129.     MoveTo(10,51);
  130.     DrawString("\ppossibility of collaborating on future programming projects;");
  131.     MoveTo(10,63);
  132.     DrawString("\pdiscussing the virus I wrote and released (MBDF-A); discussing");
  133.     MoveTo(10,75);
  134.     DrawString("\pways to keep potential virus-writers from becoming actual");
  135.     MoveTo(10,87);
  136.     DrawString("\pvirus-writers; discussing techniques for really good backrubs.");
  137.     MoveTo(10,111);
  138.     DrawString("\pMy e-mail address is f8dy@netaxs.com.  To send me e-mail");
  139.     MoveTo(10,123);
  140.     DrawString("\panonymously, mail to an48382@anon.penet.fi.  (Due to the");
  141.     MoveTo(10,135);
  142.     DrawString("\pdouble-blind system, you will be allocated an anonymous I.D.");
  143.     MoveTo(10,147);
  144.     DrawString("\pwhich will keep your identity hidden.)  To send me encrypted");
  145.     MoveTo(10,159);
  146.     DrawString("\pmail, e-mail me requesting my PGP 2.2 public key.  If you do");
  147.     MoveTo(10,171);
  148.     DrawString("\pnot have e-mail access, my home address is 1130 Radnor Hill");
  149.     MoveTo(10,183);
  150.     DrawString("\pRoad, Wayne PA, 19087-2203, USA.  Obviously, it will take");
  151.     MoveTo(10,195);
  152.     DrawString("\pme much longer to reply to snail-mail; use it as a last resort.");
  153. }
  154.  
  155. void DrawHelpMath(void)
  156. {
  157.     DrawString("\pThe game of Pentominoes is based on an article by Martin");
  158.     MoveTo(10,27);
  159.     DrawString("\pGardner (see reference below), which in turn is based on");
  160.     MoveTo(10,39);
  161.     DrawString("\pearlier work by Solomon Golomb, Henry Dudeney, and others.");
  162.     MoveTo(10,51);
  163.     DrawString("\pGolomb explored not only pentominoes, but also other sizes");
  164.     MoveTo(10,63);
  165.     DrawString("\pof polyominoes, including tetrominoes, which make up the");
  166.     MoveTo(10,75);
  167.     DrawString("\pplaying pieces in the popular game, Tetris™.  Gardner’s book");
  168.     MoveTo(10,87);
  169.     DrawString("\pis good if you don’t care about (or can’t handle) the");
  170.     MoveTo(10,99);
  171.     DrawString("\pmathematical side of polyominoes.  Gardner discusses mainly");
  172.     MoveTo(10,111);
  173.     DrawString("\ppentominoes and hexominoes, and gives suggestions for other");
  174.     MoveTo(10,123);
  175.     DrawString("\ppentomino activities which are not part of this program.");
  176.     MoveTo(10,147);
  177.     DrawString("\pGardner, Martin, “Polyominoes,” Scientific American Book");
  178.     MoveTo(10,159);
  179.     DrawString("\p     of Mathematical Puzzles and Diversions, Simon and");
  180.     MoveTo(10,171);
  181.     DrawString("\p     Schuster, New York, 1959, chapter 13.");
  182.     MoveTo(10,183);
  183.     DrawString("\pGolomb, Solomon, Polyominoes, Charles Scribner’s Sons,");
  184.     MoveTo(10,195);
  185.     DrawString("\p     New York, 1965.");
  186.     MoveTo(167,148);
  187.     LineTo(278,148);
  188.     MoveTo(25,160);
  189.     LineTo(201,160);
  190.     MoveTo(93,184);
  191.     LineTo(147,184);
  192. }
  193.  
  194. void DrawHelpFAQ(void)
  195. {
  196.     MoveTo(5,15);
  197.     TextFace(bold);
  198.     DrawString("\pWhy is my copy of Pentominoes registered to Bob?");
  199.     MoveTo(10,27);
  200.     TextFace(0);
  201.     DrawString("\pThat’s the default name the program uses if you don’t enter");
  202.     MoveTo(10,39);
  203.     DrawString("\pyour name in the personalization dialog box.");
  204.     MoveTo(5,63);
  205.     TextFace(bold);
  206.     DrawString("\pHow do I re-personalize my copy of Pentominoes?");
  207.     MoveTo(10,75);
  208.     TextFace(0);
  209.     DrawString("\pDuplicate it or copy it to another disk, then run the copy.");
  210.     MoveTo(10, 87);
  211.     DrawString("\p(Or just trash “Pentominoes prefs” in your system folder.)");
  212.     MoveTo(5,111);
  213.     TextFace(bold);
  214.     DrawString("\pWhy all the fuss over the MBDF-A virus?");
  215.     MoveTo(10,123);
  216.     TextFace(0);
  217.     DrawString("\pI’m trying to put back into the Macintosh community as much");
  218.     MoveTo(10,135);
  219.     DrawString("\pas I took out of it.  When I reach the break-even point, I’ll");
  220.     MoveTo(10,147);
  221.     DrawString("\plet you know.");
  222.     MoveTo(5,171);
  223.     TextFace(bold);
  224.     DrawString("\pHow does MSG enhance the flavor of my Macintosh?");
  225.     MoveTo(10,183);
  226.     TextFace(0);
  227.     DrawString("\pWe try to think of things that no other Macintosh program");
  228.     MoveTo(10,195);
  229.     DrawString("\pdoes, and then we do them.  Any suggestions?");
  230. }
  231.